package com.study.dao; 

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.study.entity.Repair;

/**  
 *  操作数据库的dao层
 */  

public interface RepairDao  
{  
    
    //增加一个Repair
    public void saveRepair(Repair repair);
	
	//根据id查询Repair
    public Repair getRepairById(String id);
	
	
	//分页条件查询Repair
	public List<Repair> listRepair(@Param("repair") Repair repair, @Param("from") String from, @Param("number") String number);
	
	public long getRepairCount(@Param("repair") Repair repair);
	
	
	
	
	//根据id删除Repair
	public boolean removeRepairById(String id);
	
	//更新Repair
	public void updateRepair(Repair repair);
	
	
	/**
	 *	条件更新
	 */
	
	//更新所有的Repair	
	public boolean updateRepairByExample(String id, int state, String evaluation);
	
	
	//更新Repair表中的state
	public boolean updateStateInRepair(@Param("id") String id, @Param("state")int state);
	//更新Repair表中的evaluation
	public boolean updateEvaluationInRepair(@Param("id") String id, @Param("evaluation")String evaluation);
}